﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfCore.Configers
{
    public class EADConfigers : IEntityTypeConfiguration<EAD>
    {
        public void Configure(EntityTypeBuilder<EAD> builder)
        {
            builder.ToTable("EAD"); // 设置表名
            builder.HasKey(e => e.AndId); // 设置主键
            builder.Property(e => e.AndId).HasColumnName("AndId").ValueGeneratedOnAdd(); // 设置自增列
            builder.Property(e => e.AnswerNumber).HasColumnName("AnswerNumber"); // 设置答案编号列
            builder.Property(e => e.SubjectId).HasColumnName("SubjectId"); // 设置试题编号列
            builder.Property(e => e.Answer).HasColumnName("Answer"); // 设置答题者答案列
                                                                     // 设置其他属性的配置...
        }
    }
    }
